/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-16 01:41
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
import { COMPONENT_TYPE } from '../../constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'value',
      rules: [],
      label: '默认值',
      extra: 'value(v-model)',
    },
    attrs: {
      value: 2,
      min: 1,
      max: 100,
      allowClear: true,
      placeholder: '请输入默认值'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'disabled',
      rules: [],
      label: '禁用状态',
      extra: '是否禁用状态，默认为 false,整组失效',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'allowClear',
      rules: [],
      label: '是否清除',
      extra: '是否允许再次点击后清除',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'allowHalf',
      rules: [],
      label: '是否半选',
      extra: '是否允许半选',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'count',
      rules: [],
      label: 'star 总数',
      extra: 'star 总数',
    },
    attrs: {
      value: 5,
      min: 1,
      max: 100,
      allowClear: true,
      placeholder: '请输入 star 总数'
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'icon.type',
      rules: [],
      label: '自定义字符',
      extra: '自定义字符  如果使用Ant Icon,请使用 icon-xxx,如：icon-heart',
    },
    attrs: {
      value: 'icon-star',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入自定义字符'
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'tooltips',
      rules: [],
      label: '提示信息',
      extra: '自定义每项的提示信息 string[]',
    },
    attrs: {
      autoSize: {
        minRows: 4
      },
      value: '[]',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入提示信息'
    }
  },
  {
    id: '8',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'icon.style',
      rules: [],
      label: '图标颜色',
      extra: '设置图标的样式，例如 fontSize 和 color',
    },
    attrs: {
      autoSize: {
        minRows: 4
      },
      value: '{"fontSize":"20px"}',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入提示信息'
    }
  },
  {
    id: '9',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'icon.theme',
      rules: [],
      label: '图标样式',
      extra: '图标主题风格。可选实心、描线、双色等主题风格，适用于官方图标 ',
    },
    attrs: {
      buttonStyle: 'solid',
      value: 'outlined',
      children: [
        {
          value: 'filled',
          label: 'filled'
        },
        {
          value: 'outlined',
          label: 'outlined'
        },
        {
          value: 'twoTone',
          label: 'twoTone'
        }
      ]
    }
  },
  {
    id: '10',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'icon.spin',
      rules: [],
      label: '图标动画',
      extra: '是否有旋转动画',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '11',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'icon.rotate',
      rules: [],
      label: '图标角度',
      extra: '图标旋转角度（1.4.0 后新增，IE9 无效）',
    },
    attrs: {
      value: 0,
      min: -180,
      max: 180,
      allowClear: true,
      placeholder: '请输入旋转角度'
    }
  }
]
